import request from '@/api/request';

/**
 * 分页
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListPageApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/page',
        method: 'get',
        params: query,
        isLoading: true
    });
};

/**
 * 详情
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListDetailApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/getDetail',
        method: 'get',
        params: query,
        isLoading: true
    });
};

/**
 * 添加
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListSaveApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/save',
        method: 'post',
        data: query,
        isLoading: true
    });
};

/**
 * 编辑
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListEditApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/edit',
        method: 'put',
        data: query,
        isLoading: true
    });
};

/**
 * 编辑状态
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListEditStatusApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/editStatus',
        method: 'put',
        params: query,
        isLoading: true
    });
};

/**
 * 编辑设为内置
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListEditBuildInApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/editBuildIn',
        method: 'put',
        params: query,
        isLoading: true
    });
};

/**
 * 删除
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const ipBlackListRemoveApi = query => {
    return request({
        url: '/api/mgt/ipBlackList/removeByIds',
        method: 'delete',
        params: query,
        isLoading: true
    });
};
